﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using GoogleEarthClasses.Global;

namespace GoogleEarthClasses.Data
{
    public static class DConfig
    {
        public static string GetLastVersion()
        {
            SqlCommand _Command = null;
            try
            {
                _Command = new SqlCommand("sp_SelectLastversion", DBHelper.GetConnection());
                _Command.CommandType = CommandType.StoredProcedure;
                object result = _Command.ExecuteScalar();
                return  result.ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (_Command != null) _Command.Connection.Close();
            }
        }
    }
}
